package wowmobileclient;

import javax.microedition.lcdui.Font;
import javax.microedition.lcdui.Graphics;

public class Hud {

    public Graphics g;
    public int width;
    public int height;

    public Hud(Graphics g, int width, int height) {
        this.g = g;
        this.width = width;
        this.height = height;
    }

    public void drawMenu() {
        g.setFont(Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_BOLD, Font.SIZE_MEDIUM));
        g.setColor(255,255,255);
        g.fillRect(width/2,0,width/2, height);

        g.setColor(0,0,0);
        String tmp="";
        tmp+="1. Character\n";
        tmp+="2. Magic\n";
        tmp+="3. Equipment\n";
        tmp+="\n4. Invite player";
        tmp+="\n\n5. Exit menu";
        tmp+="\n\n6. Quest";

        g.drawString(tmp,width/2+10,0,Graphics.TOP | Graphics.LEFT);


        /*if(end){
        g.setColor(0, 0, 0);
        g.fillRect(0, 0, width, height);
        g.setColor(0x00FF0000);
        g.drawString("RESTART LEVEL", 65, 80, Graphics.TOP | Graphics.LEFT);
        g.setFont(Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_BOLD, Font.SIZE_LARGE));
        g.drawString("DWARF DEAD", 60, 60, Graphics.TOP | Graphics.LEFT);
        }*/
    }

    void drawStats(PlayerStats ps)
    {
        g.setFont(Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_BOLD, Font.SIZE_MEDIUM));
        g.setColor(255,255,255);
        g.fillRect(0,0,width, height);
        g.setColor(0,0,0);
        g.drawString(ps.getStats(), 10,10, Graphics.TOP | Graphics.LEFT);
    }

    void drawMagic(PlayerStats ps)
    {
        g.setFont(Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_BOLD, Font.SIZE_SMALL));
        g.setColor(255,255,255);
        g.fillRect(0,0,width, height);
        g.setColor(0,0,0);
        g.drawString(ps.getMagic(), 10,10, Graphics.TOP | Graphics.LEFT);
    }

    void drawEq(PlayerStats ps)
    {
        g.setFont(Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_BOLD, Font.SIZE_SMALL));
        g.setColor(255,255,255);
        g.fillRect(0,0,width, height);
        g.setColor(0,0,0);
        g.drawString(ps.getItems(), 10,10, Graphics.TOP | Graphics.LEFT);
    }

    void drawQuest(String q)
    {
        g.setFont(Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_BOLD, Font.SIZE_SMALL));
        g.setColor(255,255,255);
        g.fillRect(0,0,width, height);
        g.setColor(0,0,0);
        g.drawString(q, 10,10, Graphics.TOP | Graphics.LEFT);
    }
}
